import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from "../views/Login";
import Free from "../views/Free";
import VipBook from "../views/VipBook";
import Register from "../views/Register";
import NavelDetail from "../components/NavelDetail";
import PaySuccess from "../components/PaySuccess";
import NavelContent from "../views/NavelContent";
import FindPassword from "../views/FindPassword";
import ResetPassword from "../views/ResetPassword";
import IoFo from "../views/IoFo";
import Recharge from "../views/Recharge";




Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/login',
        name: 'Login',
        component: Login
    },
    {
        path: '/register',
        name: 'Register',
        component: Register
    },
    {
        path: '/free',
        name: 'Free',
        component: Free
    },
    {
        path: '/vipbook',
        name: 'VipBook',
        component: VipBook
    },
    {
        path: '/detail/:id',
        name: 'NavelDetail',
        component: NavelDetail
    },
    {
        path: '/content/:book_id/:current_section',
        name: 'NavelContent',
        component: NavelContent
    },
    {
        path: '/find_password',
        name: "FindPassword",
        component: FindPassword,
    },
    {
        name: "IoFo",
        path: "/info",
        component: IoFo,
    },
    {
        name: "Recharge",
        path: "/pay",
        component: Recharge,
    },
    {
        name: "PaySuccess",
        path: "/pay/success",
        component: PaySuccess,
    }
];

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
